import type { ModalFormConfig } from "@/types/modal-form"

export const modalConfig: ModalFormConfig = {
  formItems: [
    {
      label: "用户名称:",
      prop: "userName",
      type: "text",
      placeholder: "请输入用户名称"
    },
    {
      label: "用户昵称:",
      prop: "nickName",
      type: "text",
      placeholder: "请输入用户昵称"
    },
    {
      label: "密码:",
      prop: "passWord",
      type: "password",
      placeholder: "请输入密码"
    },
    {
      label: "性别:",
      prop: "sex",
      type: "radio-group",
      options: [
        {
          label: "男",
          value: 1
        },
        {
          label: "女",
          value: 2
        }
      ]
    },
    {
      label: "手机号码:",
      prop: "phone",
      type: "text",
      placeholder: "请输入手机号码"
    },
    {
      label: "头像:",
      prop: "avatar",
      type: "custom"
    }
  ],
  formRules: {
    userName: [{ required: true, message: "请输入用户名称", trigger: "blur" }],
    nickName: [{ required: true, message: "请输入用户昵称", trigger: "blur" }],
    passWord: [{ required: true, message: "请输入密码", trigger: "blur" }],
    phone: [{ required: true, message: "请输入手机号", trigger: "blur" }],
    sex: [{ required: true, message: "请选择性别", trigger: "change" }]
  }
}
